package com.itheima.mapper;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {
    //自定义SQL方式一：注解  ，添加mp构建的条件语法：${ew.customSqlSegement}
    @Update("update emp set salary = salary + #{salary}    ${ew.customSqlSegment}  ")//${ew.customSqlSegment}用来获取test的条件
    public  void updateOne(@Param("salary") float salary, @Param(Constants.WRAPPER) LambdaUpdateWrapper wrapper);

}
